home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 9
/
The PC-SIG Library on CD ROM - Ninth Edition.iso
/
401_500
/
DISK0435
/
DISK0435.ZIP
/
SIGNORM.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-05-17
|
2KB
|
40 lines
(*-------------------------------------------------------------------------*)
(* SigNorm -- Significance of normal distribution *)
(*-------------------------------------------------------------------------*)
FUNCTION SigNorm( X : REAL ) : REAL;
(*-------------------------------------------------------------------------*)
(* *)
(* Function: SigNorm *)
(* *)
(* Purpose: Evaluates normal distribution probability *)
(* *)
(* Calling Sequence: *)
(* *)
(* P := SigNorm( X ); *)
(* *)
(* X --- ordinate of normal distribution *)
(* *)
(* P --- Resultant tail probability *)
(* *)
(* Calls: *)
(* *)
(* Erf *)
(* *)
(* Method: *)
(* *)
(* The simple relationship between the error function and the *)
(* normal distribution is used. *)
(* *)
(*-------------------------------------------------------------------------*)
BEGIN (* SigNorm *)
IF X >= 0.0 THEN
SigNorm := 1.0 - ( 1.0 + Erf( X / Sqrt2 ) ) / 2.0
ELSE
SigNorm := 1.0 - ( 1.0 - Erf( -X / Sqrt2 ) ) / 2.0;
END (* SigNorm *);